# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=kgeotag
pkgver=1.6.0
pkgrel=0
# armhf blocked by extra-cmake-modules
# ppc64le, s390x, riscv64 and loongarch64 blocked by qt5-qtwebengine -> marble
arch="all !armhf !ppc64le !s390x !riscv64 !loongarch64"
url="https://apps.kde.org/kgeotag/"
pkgdesc="Photo geotagging program"
license="GPL-3.0-or-later"
makedepends="
	extra-cmake-modules
	kconfigwidgets5-dev
	kcoreaddons5-dev
	kcrash5-dev
	ki18n5-dev
	kxmlgui5-dev
	libkexiv2-kf5-dev
	marble-dev
	qt5-qtbase-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/graphics/kgeotag.git"
source="https://download.kde.org/stable/kgeotag/$pkgver/kgeotag-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
cd2ac5e30e5c4267fec39d73a56550c22c1e9197a231e63a429dceeb692e06cd907959f97a96cb875e8d69008c6289ebdc1f1f93e876818383896e8024bde721  kgeotag-1.6.0.tar.xz
"
